<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: flow::log::Async_file_logger::Throttling_cfg Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceflow.html">flow</a></li><li class="navelem"><a class="el" href="namespaceflow_1_1log.html">log</a></li><li class="navelem"><a class="el" href="classflow_1_1log_1_1Async__file__logger.html">Async_file_logger</a></li><li class="navelem"><a class="el" href="structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html">Throttling_cfg</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">flow::log::Async_file_logger::Throttling_cfg Struct Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Controls behavior of the throttling algorithm as described in <a class="el" href="classflow_1_1log_1_1Async__file__logger.html" title="An implementation of Logger that logs messages to a given file-system path but never blocks any loggi...">Async_file_logger</a> doc header Throttling section.  
 <a href="structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="async__file__logger_8hpp_source.html">async_file_logger.hpp</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for flow::log::Async_file_logger::Throttling_cfg:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg__coll__graph.svg" width="195" height="143"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a7a30343e388c65594d06baed25b1aaa9"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html#a7a30343e388c65594d06baed25b1aaa9">m_hi_limit</a></td></tr>
<tr class="memdesc:a7a30343e388c65594d06baed25b1aaa9"><td class="mdescLeft">&#160;</td><td class="mdescRight">The throttling algorithm will go from Not-Throttling to Throttling state if and only if the current memory usage changes from <code>&lt; m_hi_limit</code> to <code>&gt;= m_hi_limit</code>.  <a href="structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html#a7a30343e388c65594d06baed25b1aaa9">More...</a><br /></td></tr>
<tr class="separator:a7a30343e388c65594d06baed25b1aaa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-attribs" name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a72a52accb11b29307dad69748e133818"><td class="memItemLeft" align="right" valign="top">static constexpr uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html#a72a52accb11b29307dad69748e133818">S_HI_LIMIT_DEFAULT</a> = 1ull * 1024 * 1024 * 1024</td></tr>
<tr class="memdesc:a72a52accb11b29307dad69748e133818"><td class="mdescLeft">&#160;</td><td class="mdescRight">Value of <code>Async_file_logger(...).<a class="el" href="classflow_1_1log_1_1Async__file__logger.html#ac2080e8abfc2cd9580c84626ae205010" title="Accessor returning a copy of the current set of throttling knobs.">throttling_cfg()</a>.m_hi_limit</code>: default/initial value of <a class="el" href="structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html#a7a30343e388c65594d06baed25b1aaa9" title="The throttling algorithm will go from Not-Throttling to Throttling state if and only if the current m...">m_hi_limit</a>.  <a href="structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html#a72a52accb11b29307dad69748e133818">More...</a><br /></td></tr>
<tr class="separator:a72a52accb11b29307dad69748e133818"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Controls behavior of the throttling algorithm as described in <a class="el" href="classflow_1_1log_1_1Async__file__logger.html" title="An implementation of Logger that logs messages to a given file-system path but never blocks any loggi...">Async_file_logger</a> doc header Throttling section. </p>
<p >As noted there, value(s) therein affect the algorithm for computing Throttling versus Not-Throttling state but <em>not</em> whether <a class="el" href="classflow_1_1log_1_1Async__file__logger.html#ad139ac22e5953e52e03648860a15e3fd" title="Implements interface method by returning true if the severity and component (which is allowed to be n...">should_log()</a> actually allows that state to have any effect. That is controlled by a peer argument to <a class="el" href="classflow_1_1log_1_1Async__file__logger.html#ac2080e8abfc2cd9580c84626ae205010" title="Accessor returning a copy of the current set of throttling knobs.">throttling_cfg()</a>.</p>
<h3>Rationale</h3>
<p >Why the <code>struct</code> and not just expose <code>m_hi_limit</code> by itself? Answer: there is a "note" about it in the <a class="el" href="classflow_1_1log_1_1Async__file__logger.html" title="An implementation of Logger that logs messages to a given file-system path but never blocks any loggi...">Async_file_logger</a> class doc header. Short answer: maintainability/future-proofing. </p>

<p class="definition">Definition at line <a class="el" href="async__file__logger_8hpp_source.html#l00376">376</a> of file <a class="el" href="async__file__logger_8hpp_source.html">async_file_logger.hpp</a>.</p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="a7a30343e388c65594d06baed25b1aaa9" name="a7a30343e388c65594d06baed25b1aaa9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a30343e388c65594d06baed25b1aaa9">&#9670;&nbsp;</a></span>m_hi_limit</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint64_t flow::log::Async_file_logger::Throttling_cfg::m_hi_limit</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The throttling algorithm will go from Not-Throttling to Throttling state if and only if the current memory usage changes from <code>&lt; m_hi_limit</code> to <code>&gt;= m_hi_limit</code>. </p>
<p ><a class="el" href="classflow_1_1log_1_1Async__file__logger.html" title="An implementation of Logger that logs messages to a given file-system path but never blocks any loggi...">Async_file_logger</a> doc header Throttling section calls this value H. It must be positive. </p>

<p class="definition">Definition at line <a class="el" href="async__file__logger_8hpp_source.html#l00385">385</a> of file <a class="el" href="async__file__logger_8hpp_source.html">async_file_logger.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="async__file__logger_8cpp_source.html#l00242">flow::log::Async_file_logger::do_log()</a>, and <a class="el" href="async__file__logger_8cpp_source.html#l00126">flow::log::Async_file_logger::throttling_cfg()</a>.</p>

</div>
</div>
<a id="a72a52accb11b29307dad69748e133818" name="a72a52accb11b29307dad69748e133818"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a72a52accb11b29307dad69748e133818">&#9670;&nbsp;</a></span>S_HI_LIMIT_DEFAULT</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr uint64_t flow::log::Async_file_logger::Throttling_cfg::S_HI_LIMIT_DEFAULT = 1ull * 1024 * 1024 * 1024</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">constexpr</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Value of <code>Async_file_logger(...).<a class="el" href="classflow_1_1log_1_1Async__file__logger.html#ac2080e8abfc2cd9580c84626ae205010" title="Accessor returning a copy of the current set of throttling knobs.">throttling_cfg()</a>.m_hi_limit</code>: default/initial value of <a class="el" href="structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html#a7a30343e388c65594d06baed25b1aaa9" title="The throttling algorithm will go from Not-Throttling to Throttling state if and only if the current m...">m_hi_limit</a>. </p>
<p >Note that this value is not meant to be some kind of universally correct choice for <a class="el" href="structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html#a7a30343e388c65594d06baed25b1aaa9" title="The throttling algorithm will go from Not-Throttling to Throttling state if and only if the current m...">m_hi_limit</a>. Users can and should change <code>m_hi_limit</code>. </p>

<p class="definition">Definition at line <a class="el" href="async__file__logger_8hpp_source.html#l00393">393</a> of file <a class="el" href="async__file__logger_8hpp_source.html">async_file_logger.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="async__file__logger_8cpp_source.html#l00032">flow::log::Async_file_logger::Async_file_logger()</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>log/<a class="el" href="async__file__logger_8hpp_source.html">async_file_logger.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:35 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
